import Vue from 'vue'

let page = {
  total: 1,
  startIndex: 0,
  stepNumber: 40,
  currentPage: 1
};


let data={
  android :{
    id:"",
    versioncode:0,
    type:"",
    description:"",
    url:"",
    isForce:0,
    state:"",
    name:"",
    compatibleVersionCode:0,
    htmlContent:""
  },
  ios :{
    id:"",
    versioncode:0,
    type:"",
    description:"",
    url:"",
    isForce:0,
    state:"",
    name:"",
    compatibleVersionCode:0,
    htmlContent:""
  },
}

let status={
  editMode:{
    isEdit:false,
    selectedTab:"",
    btnName:"编辑"
  }

};

let params={
  searchParams:{
    type:-1
  },
  versionData:{
    id:"",
    type:"",
    description:"",
    url:"",
    isForce:0,
    state:"",
    name:"",
    compatibleVersionCode:"",
    htmlContent:""
  },
  versionRule:{
    versioncode: [
      {type: 'integer', required: true, message: '最新版本号不能为空', trigger: 'blur'},
    ],
    url: [
      {required: true, message: '下载地址不能为空', trigger: 'blur'}
    ],
    compatibleVersionCode: [
      {type: 'integer', required: true, message: '最低兼容版本号不能为空', trigger: 'blur'}
    ],
    name:[
      {required: true, message: '版本名称不能为空', trigger: 'blur'}
    ],
  }
};

export  default  {
  tPage: page,
  tStatus: status,
  tParam: params,
  tData: data,
};
